package mainKTY;


import java.util.StringTokenizer;

public class Deployee {
    private int id;

    public int getId() {
        return id;
    }

    private String name;
    private double ktu;
    private double salary;

    public double getKtu() {
        return ktu;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setKtu(double ktu) {
        this.ktu = ktu;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public double getSalary(double v) {

        return salary;
    }

    public Deployee(int id, String name, double ktu, double salary) {
        this.name = name;
        this.ktu = ktu;
        this.salary = salary;
        this.id = id;
    }

    public Deployee(String addFromFile){
        StringTokenizer token = new StringTokenizer(addFromFile,"|");
        this.id = Integer.parseInt(token.nextToken());
        this.name = token.nextToken();
        this.ktu =Double.parseDouble(token.nextToken());
        this.salary =Double.parseDouble(token.nextToken());
    }

    @Override
    public String toString() {
        return id + "|" + name + "|" + ktu + "|" + salary;
    }
}



